package com.chlitina.store.modules.report.model;

import com.chlitina.store.modules.base.entity.StoreProduct;

/*
 * 报表产品
 */
public class ReportProduct {
	private StoreProduct product;//产品
	private int saleNumber;//销售数量
	private float totalPrice;//总价
	public ReportProduct() {
	}
	public StoreProduct getProduct() {
		return product;
	}
	public void setProduct(StoreProduct product) {
		this.product = product;
	}
	public int getSaleNumber() {
		return saleNumber;
	}
	public void setSaleNumber(int saleNumber) {
		this.saleNumber = saleNumber;
	}
	public float getTotalPrice() {
		return totalPrice;
	}
	public void setTotalPrice(float totalPrice) {
		this.totalPrice = totalPrice;
	}
	
	public String[] toArray(){
		String[] ret = new String[4];
		if (this.product.getProduct_type() == 0) {
			ret[0] = this.product.getProduct().getName();
		}
		if (this.product.getProduct_type() == 1) {
			ret[0] = this.product.getStoreSelfProduct().getName();
		}
		ret[1] = this.saleNumber + "";
		ret[2] = this.totalPrice + "";
		ret[3] = "查询明细";
		return ret;
	}
}
